<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.tietiao.com/functions" prefix="my"%>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>通知</title>
<%@ include file="../include/easyjs_include.jsp"%>
<!--[if lt IE 9]>
		<script src="/_ui/js/html5.js"></script>
	<![endif]-->
<!--[if lte IE 7]>
		<link rel="stylesheet" type="text/css" media="all" href="../css/feground/ie.css" />
	<![endif]-->
<script type="text/javascript" src="./js/fg/common/utils.js"></script>
<script>
function deleteMessage(messageId,obj){
	$.ajax({
		   dataType:'json',
		   url: "notice_sysMessage_delete.htm",
		   data:{'messageId':messageId},
		   success:function(data){
		   	if(data){
		   		$(obj).parent().parent().parent().parent().slideToggle();
		   	}else{
		   		alert('删除消息失败，请刷新后重试！');
		   	}
		   }
		});
}
</script>
</head>

<body style="overflow: inherit;" class="wider no-subnav catalog-lists">
<c:import url="../include/default_head.jsp" >
	<c:param name="menu" value="7" />
</c:import>
<div class="container ">
	<div class="wrapper-content left-sidebar">
		<div id="content">
			<ul id="allmsglist">
				<c:forEach var="message" items="${sysMessage}">
					<li class="msg-item clr  ${message.isView==0?'unread':'read'} ">
						<div class="pro-pic"><a href="friend_friends_home.htm?userId=${message.userId}"><img width="48" height="48" src="${photoPath}${message.userPhoto}"></a></div>
						<div class="msg-content">
							<span class="pr">
								<a href="friend_friends_home.htm?userId=${message.userId}" class="msg_username">${message.petName}</a>
								<b id="b1"><a class="graylk"  href="#" onclick="deleteMessage('${message.messageId}',this)">删除</a></b>
							</span>
							<p>${message.message}</p>
							<span class="msg-c"><fmt:formatDate value="${message.createTime}" pattern="yyyy-MM-dd HH:mm"/><b>1条私信</b></span>
						</div>
					</li>
				</c:forEach>
			</ul>
		</div>
		<!-- / content -->
		<div id="sidebar">
			<ul class="vtab">
				<li class="${messageType==3?'vtab-selected':'' }"><a href="notice_sysMessage_list.htm?messageType=3">Ta推荐给我</a></li>
				<li class="${messageType==2?'vtab-selected':'' }"><a href="notice_sysMessage_list.htm?messageType=2">Ta评论商品</a></li>
				<li class="${messageType==4?'vtab-selected':'' }"><a href="notice_sysMessage_list.htm?messageType=4">Ta关注我</a></li>
				<li class="${messageType==1?'vtab-selected':'' }"><a href="notice_sysMessage_list.htm?messageType=1">系统通知</a></li>
			</ul>
		</div>
		<!-- / sidebar --> 
		
	</div>
	<!-- / wrapper-content -->
	<c:import url="../include/default_foot.jsp" />
	<!-- / footer --> 
	
</div>
<!-- / container --> 
<!-- / container --> 
<div id="fb-root"> </div>
</body>
</html>